Skip to content

fix: patch Wardline 1.0.5 review regressions#46

Merged
tachyon-beep merged 2 commits into
mainfrom
codex/wardline-1.0.5-review-fixes
Jun 18, 2026
Merged

fix: patch Wardline 1.0.5 review regressions#46
tachyon-beep merged 2 commits into
mainfrom
codex/wardline-1.0.5-review-fixes

Conversation

@tachyon-beep

Copy link
Copy Markdown
Collaborator

Summary

Reviewed all commits merged into main in the last 24 hours (window anchored at 2026-06-19 08:07:31 +10:00):

  • 477e33be John Morrissey — docs: fix doc/site rot surfaced in review. Docs/site version and link cleanup; no code regression found.
  • 19089461 John Morrissey — fix: make TYPE_CHECKING reachability scope-aware. Found a remaining reachability bug for function-local non-typing imports that shadow TYPE_CHECKING; fixed here.
  • 117649ca John Morrissey — feat: warpline delta scan (wardline scan --affected) + review hardening. Found over-expansion in caller closure when an affected file also contained unrelated entities; fixed here.
  • 17cbcb96 John Morrissey — fix: reject --affected with --fail-on. Surface policy is correct; no further bug found.
  • ea6faebe John Morrissey — fix: mark advisory affected scans not evaluated. Engine verdict behavior is covered by existing tests; no further bug found.
  • c09c80b7 John Morrissey — chore: prepare wardline 1.0.4. Release metadata was consistent and PyPI 1.0.4 is installable.

Fixes

  • Treat function-local imports and binding targets as scope shadows before restoring only genuine local typing imports. This prevents a false PY-WL-102 when TYPE_CHECKING is rebound to a runtime value.
  • Seed --affected caller closure from resolved affected qualnames rather than every entity in each affected file. This keeps callers of unrelated co-file helpers out of the advisory delta scan.
  • Bump patch release metadata to 1.0.5 and add changelog entries with commit references.

Verification

  • uv run pytest --cov=wardline --cov-report=term-missing --cov-fail-under=90 — 4189 passed, 18 deselected, coverage 92.43%.
  • uv run ruff check src tests
  • uv run ruff format --check src tests
  • uv run mypy
  • uv run wardline scan . --fail-on ERROR — 0 active findings.
  • uv run wardline scan src/ --format sarif --output /tmp/wardline-self-scan.sarif --fail-on ERROR — 0 active findings.
  • uv build
  • uvx twine check dist/*
  • uvx --from ./dist/wardline-1.0.5-py3-none-any.whl[scanner] wardline --version — 1.0.5.
  • npm --prefix site run build

@tachyon-beep
tachyon-beep merged commit 0505f2f into main Jun 18, 2026
8 checks passed
@tachyon-beep
tachyon-beep deleted the codex/wardline-1.0.5-review-fixes branch June 18, 2026 22:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0752a28f8a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +194 to +195
elif isinstance(stmt, ast.ExceptHandler) and stmt.name:
yield stmt.name

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle except aliases when shadowing TYPE_CHECKING

When the shadowing binding is except ... as TYPE_CHECKING, this branch never runs because _own_statements() yields only ast.stmt children and recurses through ExceptHandler bodies rather than yielding the handler node itself. In a handler such as except ValueError as TYPE_CHECKING: if TYPE_CHECKING: raise ..., the module-level TYPE_CHECKING alias therefore remains in the scoped alias map, so the reachable raise is still treated as a dead typing-only branch and the boundary rules can report the wrong result for exception-handler validation paths. Collect handler names while visiting ast.Try/ast.TryStar instead.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant